#ifndef QTCPDRIVER_H
#define QTCPDRIVER_H

#include "qabstractdriver.h"

#include <QTcpSocket>

class SHAREDLIB_EXPORT QTCPDriverHost : public QAbstractDriver
{
    Q_OBJECT
public:
    Q_INVOKABLE QTCPDriverHost(QAbstractHost* parent=0);

    static QString get_show_name();

    void    start();
    void    closed();
protected slots:
    void    connect_slot();
    void    readyread();
protected:
    void    mission_done(QMission* ms);
    void    write(const QByteArray &data);
    void    update_send_data(QMission *ms);
protected:
    void    create_object();
    void    init_property();
protected:
    QTcpSocket      *m_tcp_socket;

    QByteArray      m_recv_data;
};

#endif // QTCPDRIVER_H
